#pragma once
#include "UIBase.h"
#include "../tools/RichTextEx.h"

class BuyUI : public UIBase
{
public:
	BuyUI();
	~BuyUI();
public:
	static cocos2d::Node* createNode();
	virtual bool init();
	CREATE_FUNC(BuyUI);

	Node* m_selectedNode;
	vector<Sprite*> m_controlList;
	Node* m_commodityItemList[10];

	int m_curSelIndex;
	int m_curPage;
	Sprite* m_closeBtn;
	Text* m_pageText;
public:
	bool TouchDown(Touch* touch);
	void TouchMove(Touch* touch);
	bool TouchUp(Touch* touch);

	void ResetPage();

	void Open();							//打开
	void Close();							//关闭
	void RefreshData();					//刷新背包界面数据
};